package com.tank.decoration;

import com.tank.entrity.GameObject;

import java.awt.*;

/**
 * 游戏物体的装饰器
 */
public abstract class GameDecorator extends GameObject {
    private final GameObject gameObject;

    public GameDecorator(GameObject gameObject) {
        this.gameObject = gameObject;
    }

    @Override
    public void paint(Graphics graphics) {
        gameObject.paint(graphics);
    }

    public GameObject getGameObject() {
        return gameObject;
    }
}
